package HomeWork; /**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2022-09-21
 * Time:21:45
 */

/**
 * 作业标题(2252)
 * 顺序打印-进阶版
 * 作业内容
 * 有三个线程，分别只能打印A，B和C
 * 要求按顺序打印ABC，打印10次
 * 输出示例：
 * ABC
 * ABC
 * ABC
 * ABC
 * ABC
 * ABC
 * ABC
 * ABC
 * ABC
 * ABC
 */
class Locker{

}


public class Home915 {
    public static void main(String[] args) throws InterruptedException {
        for(int i=0;i<10;i++) {

            Thread t1 = new Thread(new Runnable() {
                @Override
                public void run() {
                    System.out.print("A");
                }
            });
            t1.run();
            Thread t2 = new Thread(new Runnable() {
                @Override
                public void run() {
                    System.out.print("B");
                }
            });
            t2.run();
            Thread t3 = new Thread(new Runnable() {
                @Override
                public void run() {
                    System.out.println("C");
                }
            });
            t3.run();
        }
    }
}
